import {publicFun} from '@/libs/publicFun'
export default {
    //打印订单
    "9": [
        {
            title: "订单编号",
            key: "orderNo",
            minWidth: 220,
            align: "center",
            fixed: "left",
        },
        {
            title: "打印机名称",
            key: "serialNo",
            width: 140,
            align: "center",
            render: (h, params) => {
                let nodeTxt = ''
                if(params.row.print) {
                    nodeTxt = params.row.print.title
                }
                return h("span", nodeTxt)
            },
        },
        {
            title: "订单发起人",
            key: "realName",
            width: 140,
            align: "center",
        },
        {
            title: "订单发起时间",
            key: "createTime",
            width: 140,
            align: "center",
        },
        {
            title: "状态",
            key: "userPhone",
            width: 140,
            align: "center",
            render: (h, params) => {
                let txt = publicFun.orderStatus(params.row.status)
                return h('span',[
                  txt
                ])
              }
        },
        {
            title: "打印数量",
            key: "totalNum",
            minWidth: 220,
            align: "center",
        },
        {
            title: "总价",
            key: "totalPrice",
            minWidth: 220,
            align: "center",
        },
        {
            title: "扣除个人积分",
            key: "createTime",
            minWidth: 220,
            align: "center",
            render(h, params) {
                let nodeTxt = ''
                if(params.row.useIntegralType == '1') {
                    nodeTxt = params.row.useIntegralType
                }
                return h('span', nodeTxt)
            },
        },
        {
            title: "扣除企业积分",
            key: "createTime",
            minWidth: 220,
            align: "center",
            render(h, params) {
                let nodeTxt = ''
                if(params.row.useIntegralType == '4' || params.row.useIntegralType == '5') {
                    nodeTxt = params.row.useIntegralType
                }
                return h('span', nodeTxt)
            },
        },
        {
            title: "扣除云打印机专项积分",
            key: "createTime",
            minWidth: 220,
            align: "center",
            render(h, params) {
                let nodeTxt = ''
                if(params.row.useIntegralType == '3') {
                    nodeTxt = params.row.useIntegralType
                }
                return h('span', nodeTxt)
            },
        },
        {
            title: "最后支付金额",
            key: "payPrice",
            minWidth: 220,
            align: "center",
        },
        {
            title: "支付类型",
            key: "createTime",
            minWidth: 220,
            align: "center",
            render: (h, params) => {
                let txt = publicFun.paySubType(params.row.paySubType)
                return h('span',[
                  txt
                ])
            }
        },
        // {
        //     title: "操作",
        //     key: "createTime",
        //     minWidth: 220,
        //     align: "center",
        // }
    ],
    //会议室
    "3": [
        {
            title: "订单编号",
            key: "orderNo",
            minWidth: 220,
            align: "center",
            fixed: "left",
        },
        {
            title: "会议室名称",
            key: "parkRoleType",
            width: 200,
            align: "center",
            render(h, params) {
                let nodeTxt = ''
                if(params.row.orderDetails.length>0) {
                    nodeTxt = params.row.orderDetails[0].productName
                }
                return h('span', nodeTxt)
            },
        },
        // {
        //     title: "消费会议积分",
        //     key: "useIntegral",
        //     width: 140,
        //     align: "center",
        // },
        {
            title: "订单发起人",
            key: "realName",
            width: 140,
            align: "center",
        },
        {
            title: "订单发起时间",
            key: "createTime",
            width: 140,
            align: "center",
        },
        {
            title: "状态",
            key: "userPhone",
            width: 100,
            align: "center",
            render: (h, params) => {
                let txt = publicFun.orderStatus(params.row.status)
                return h('span', [
                    txt
                ])
            }
        },
        {
            title: "会议室预定时间",
            key: "orderDetails",
            minWidth: 220,
            align: "center",
            render: (h, params) => {
                let nodeTxt = ''
                if(params.row.orderDetails.length > 0) {
                    nodeTxt = params.row.orderDetails[0].startDate + '~' + params.row.orderDetails[0].endDate
                }
                return h("span", nodeTxt)
            },
        },
        {
            title: "单价",
            key: "price",
            minWidth: 220,
            align: "center",
            render: (h, params) => {
                let nodeTXt = ''
                if(params.row.meetRoom) {
                    nodeTXt = params.row.meetRoom.meetRoomSet.price
                }
                return h("span", nodeTXt)
            },
        },
        {
            title: "总价",
            key: "totalPrice",
            minWidth: 220,
            align: "center",
        },
        {
            title: "扣除个人积分",
            key: "createTime",
            minWidth: 220,
            align: "center",
            render(h, params) {
                let nodeTxt = ''
                if(params.row.useIntegralType == '1') {
                    nodeTxt = params.row.useIntegralType
                }
                return h('span', nodeTxt)
            },
        },
        {
            title: "扣除企业积分",
            key: "createTime",
            minWidth: 220,
            align: "center",
            render(h, params) {
                let nodeTxt = ''
                if(params.row.useIntegralType == '4' || params.row.useIntegralType == '5') {
                    nodeTxt = params.row.useIntegral
                }
                return h('span', nodeTxt)
            },
        },
        {
            title: "扣除共享会议室专项积分",
            key: "createTime",
            minWidth: 220,
            align: "center",
            render(h, params) {
                let nodeTxt = ''
                if(params.row.useIntegralType == '3') {
                    nodeTxt = params.row.useIntegral
                }
                return h('span', nodeTxt)
            },
        },
        {
            title: "最后支付金额",
            key: "payPrice",
            minWidth: 220,
            align: "center",
        },
        {
            title: "支付类型",
            key: "payType",
            minWidth: 220,
            align: "center",
            render: (h, params) => {
                let txt = publicFun.paySubType(params.row.paySubType)
                return h('span', [
                    txt
                ])
            }
        },
        // {
        //     title: "操作",
        //     key: "createTime",
        //     minWidth: 220,
        //     align: "center",
        //     render: (h, params) => {
        //         let enableOrDisable = "";
        //         enableOrDisable = h(
        //           "a",
        //           {
        //             on: {
        //               click: () => {
        //                 this.modal = true
        //                 this.detailData = params.row
        //               }
        //             }
        //           },
        //           "详情"
        //         )
        //         return h("div", [
        //           enableOrDisable,
        //         ]);
        //     },
        // }
    ]
}